package com.apigen.platform.controller;

import com.apigen.platform.common.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 简单测试控制器
 *
 * @author API Generator
 * @since 2024-09-24
 */
@Tag(name = "系统测试", description = "系统测试相关接口")
@RestController
@RequestMapping("/api/test")
public class SimpleController {

    @Operation(summary = "健康检查", description = "检查系统是否正常运行")
    @GetMapping("/health")
    public Result<String> health() {
        return Result.success("系统运行正常", "API Generator Platform is running!");
    }

    @Operation(summary = "获取系统信息", description = "获取系统基本信息")
    @GetMapping("/info")
    public Result<Object> info() {
        return Result.success("系统信息", new Object() {
            public final String name = "API Generator Platform";
            public final String version = "1.0.0";
            public final String description = "智能API生成平台";
            public final long timestamp = System.currentTimeMillis();
        });
    }
}
